package com.cskaoyan.controller.wxgoods;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.CommonData;
import com.cskaoyan.bean.po.ohter.MarketBrand;
import com.cskaoyan.bean.vo.wxgoods.BrandListInfo;
import com.cskaoyan.service.wxgoods.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Ajun de BBC
 * @Date 2022/7/21 11:43
 * @Version 1.5
 */

@RestController
@RequestMapping("wx/brand")
public class WxBrandController {
    @Autowired
    WxBrandService wxBrandService;

    @RequestMapping("list")
    public BaseRespVo brandList(Integer page,Integer limit){
        CommonData<BrandListInfo> brandList = wxBrandService.brandList(page,limit);
        return  BaseRespVo.ok(brandList,"成功",0);
    }

    @RequestMapping("detail")
    public BaseRespVo brandDetail(Integer id){
        MarketBrand marketBrand = wxBrandService.brandDetail(id);
        return BaseRespVo.ok(marketBrand,"成功",0);
    }
}
